﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;

namespace AliCMS.TemplateEngine
{
    internal class OutputStatment : Tag
    {
        internal OutputStatment(Engine engine, int index, int length, int contentIndex, int contentLength, Tag parent)
            : base(engine, index, length, contentIndex, contentLength, parent)
        {
        }

        internal override void Parse()
        {
            if (!_isAliasStatment)
                ResultCode = Engine.ParseExpression(this, Engine.Text.Substring(ContentIndex, ContentLength));
        }

        #region Properties
        internal bool IsAliasStatment
        {
            get { return _isAliasStatment; }
            set { _isAliasStatment = value; }
        }
        internal string AliasXml
        {
            get { return _aliasXml; }
            set { _aliasXml = value; }
        }
        internal string AliasCode
        {
            get { return _aliasCode; }
            set { _aliasCode = value; }
        }
        #endregion

        #region Fields
        private bool _isAliasStatment;
        private string _aliasXml;
        private string _aliasCode;
        #endregion
    }
}
